import React from 'react';


import Item, { IFormItemProps } from './Item'
import { Checkbox } from 'antd';
import { CheckboxProps, CheckboxGroupProps } from 'antd/lib/checkbox';
const CheckboxGroup = Checkbox.Group;


interface ICheckProps extends CheckboxProps, IFormItemProps {
}


interface ICheckGroupProps extends CheckboxGroupProps, IFormItemProps {

}

class FormCheckGroup extends React.Component<ICheckGroupProps> {
	render() {
		return (
			<Item {...this.props}
				render={() => (
					<Checkbox.Group {...this.props} />
				)} />
		)

	}
}

export default class FormCheck extends React.Component<ICheckProps> {
	render() {
		// console.log("check-props:", this.props)
		return (
			<Item {...this.props}
				render={() => (
					<Checkbox {...this.props} />
				)} />
		)

	}
	public static Group = FormCheckGroup
}